home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
EARCD
/
util
/
rexx
/
ComFromFile.lha
/
ComFromFile
next >
Wrap
Text File
|
1996-12-21
|
3KB
|
105 lines
/*
** $VER: ComFromFile V1.2 (24.8.1996)
**
** Comment Archives from a filelist a la FILES.BBS (Aminet CD) or
** kompartible format.
**
** Examples of Columns:
**
** FILES.BBS = 34 (FileId)
** FILES.BBS = 25 (Aminet CD)
** AMINET INDEX = 40 (Server)
** FILES.MSD = 19 (Aminet CD)
**
** Required rexxsupport.library, rexxtricks.library and Commodore list
** Command or kompartible, the librarys aviable for all Aminet Sites.
**
** Write your Comment to igotu@cube.net - 2:2483/444.4@fidonet
**
** Written by Reinaldo Erdey
*/
options results
/* --------------------------------------------------------------- */
If ~Show('L','rexxtricks.library') Then
Do
If ~Addlib('rexxtricks.library',0,-30,0) Then Call Err ("Couldn't allocate rexxtricks.library!")
End
/* --------------------------------------------------------------- */
if ~Show('L','rexxsupport.library') Then
Do
If ~Addlib('rexxsupport.library',0,-30,0) Then Call Err ("Couldn't allocate rexxsupport.library!")
End
/* --------------------------------------------------------------- */
SIGNAL ON HALT; SIGNAL ON BREAK_C; SIGNAL ON BREAK_D ; SIGNAL ON BREAK_F
PARSE ARG description BegCom
if strip(description) = '' | strip(description) = '?' then Do
Call Usage()
End
if strip(BegCom) = '' | Datatype(BegCom) ~= 'NUM' then Do
Call Usage()
End
BegCom = strip(BegCom)-1
/* ---------------------------------------------------------------------- */
ADDRESS COMMAND
'list >T:temp LFORMAT "%N" ~(#?.(readme|info)) FILES'
If ~Open(tmp1,'T:temp', r) Then Do
Call Err ("Couldn't open T:temp")
End
do until eof(tmp1)
FileName = Strip(Readln(tmp1))
If ~Open(Tmp2,strip(description), r) Then Do
Call Err ("Couldn't open "strip(description))
End
do until eof(tmp2)
Zeile = Strip(Readln(tmp2))
PS = POS(Upper(FileName),Upper(Zeile))
If PS = 1 Then do
If Length(Right((Strip(Zeile)),(Length(strip(Zeile))-BegCom))) <= 79 then do
Call SetComment FileName,Right((Strip(Zeile)),(Length(strip(Zeile))-BegCom))
Say 'Comment File > 'FileName
End
End
End
Call Close(tmp2)
End
Call Close(tmp1)
Call Delete 'T:temp'
Exit
/* --------------------------------------------------------------- */
/* Ein Error ist aufgetreten */
Err:
Parse Arg String
Say String
Exit
/* --------------------------------------------------------------- */
Usage:
Say d2c(10)||'ARexx Programm by © Reinaldo Erdey April 1996 MCMXCVI'
Say ' (Comment a File from description-file)'||d2c(10)
Say 'USAGE: [rx] ComFromFile Descriptionfile/A Column/A'||d2c(10)
Say ' (Aminet Index = 40 - FILES.BBS = 34)'||d2c(10)
Exit
/* --------------------------------------------------------------- */
BREAK_C:; BREAK_D:; BREAK_E:; BREAK_F:; HALT:
Say d2c(10)||'*** User-break detected ***'||d2c(10)
Exit